<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>iframe测试体验页面无刷新</title>
    <script>
        function go() {
            var url=document.getElementById("url").value;
            document.getElementById("iframeid1").src = url;
        }
    </script>
</head>
<body>
<div>
    <p>请输入地址：</p>
    <p>
        <input type="text" id="url" value="https://www.cnblogs.com/999520hzy/p/13917446.html">
        <input type="button" value="提交" onclick="go()">
    </p>
</div>
<div>
    <!--方案一：直接访问地址-->
    <!--<iframe src="https://www.cnblogs.com/999520hzy/p/13917446.html" frameborder="0" style="width: 100%;height: 500px"></iframe>-->

<iframe id="iframeid1" style="width: 100%;height: 500px"></iframe>

</div>

</body>
</html>
